﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="create_city.aspx.cs" Inherits="create_city" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style5
        {
            width: 70%;
        }
        .style6
        {
            width: 165px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <p>
                <span class="title2">Create a new city in Citiport!</span></p>
            
                <asp:Label ID="Label4" runat="server" ForeColor="Red" 
                    Text="This city has been created already!"></asp:Label>
            
            <table class="style5">
                <tr>
                    <td class="style6">
                        City name</td>
                    <td>
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            ControlToValidate="TextBox1" ErrorMessage="?"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style6">
                        Country name</td>
                    <td>
                        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                            ControlToValidate="TextBox2" ErrorMessage="?"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style6">
                        Continent</td>
                    <td>
                        <asp:DropDownList ID="DropDownList1" runat="server">
                            <asp:ListItem Value="0">Asia</asp:ListItem>
                            <asp:ListItem Value="1">America</asp:ListItem>
                            <asp:ListItem Value="2">Africa</asp:ListItem>
                            <asp:ListItem Value="3">Europe</asp:ListItem>
                            <asp:ListItem Value="4">Oceania</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style6" valign="top">
                        Native language<br />
                        in this city<asp:RequiredFieldValidator ID="RequiredFieldValidator3" 
                            runat="server" ControlToValidate="RadioButtonList1" ErrorMessage="?"></asp:RequiredFieldValidator>
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
                            DataSourceID="LinqDataSource1" DataTextField="title" DataValueField="no" 
                            RepeatColumns="3" RepeatDirection="Horizontal">
                        </asp:RadioButtonList>
                    </td>
                </tr>
            </table>
            <p>
                <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="ok" />
                <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                    ContextTypeName="ctpDataContext" TableName="languages" 
                    Where="language_no == @language_no">
                    <WhereParameters>
                        <asp:SessionParameter Name="language_no" SessionField="now_user_lang_no" 
                            Type="Int32" />
                    </WhereParameters>
                </asp:LinqDataSource>
            </p>
        </ContentTemplate>
    </asp:UpdatePanel>
    <p>
</p>
</asp:Content>

